<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />

<link rel="stylesheet" type="text/css" href="static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/style.css" />


<title>用户管理</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 用户中心 <span class="c-gray en">&gt;</span> 用户管理 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
	<div class="text-c"> 日期范围：
		<input type="text" onfocus="WdatePicker({ maxDate:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}' })" id="datemin" class="input-text Wdate" style="width:120px;">
		-
		<input type="text" onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'datemin\')}',maxDate:'%y-%M-%d' })" id="datemax" class="input-text Wdate" style="width:120px;">
		<input type="text" class="input-text" style="width:250px" placeholder="输入会员名称、电话、邮箱" id="" name="">
		<button type="submit" class="btn btn-success radius" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜用户</button>
	</div>
	<div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l"><a href="javascript:;" onclick="datadel()" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a> <a href="javascript:;" onclick="member_add('添加用户','member-add.html','','510')" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;
	</i>新增盘点单</a></span>
<span>
<a href="javascript:;"  class="btn btn-primary radius"><i>
</i>保   存</a>
<a href="javascript:;"  class="btn btn-primary radius"><i>
</i>查看未盘点商品</a>
<a href="javascript:;"  id="pandian" class="btn btn-primary radius"><i>
</i>盘点</a>
</span>

	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

	<span class="r">共有数据：<strong>88</strong> 条</span> </div>
		<div class="mt-20">

     <table class="table">
     <tr>
     <td>盘点单号</td><td> PD201706130023</td>
	<td>
	<td>仓库</td>

	<td>
	<select  id="reposity" class="select">
	<option>请选择</option>
	<c:forEach items="${requestScope.stoList}" var="stock">
	<option value="${stock.stoId}">${stock.stoName}</option>
	</c:forEach>
	</select>
	</td>
		<td></td>
	<td >盘点总数</td>
	<td id="count"></td>
	<td></td>
	<td>盈亏总数</td>
	<td>10</td>
	<td></td>
	<td></td>
	<td>盈亏总金额</td>
	<td>300</td>
	<td></td>
	<td></td>
	<td>备注</td><td><input  class='input-text'></input></td>
	</tr>
	</table>
	<!-- 空行 -->
	<div class="mt-20">
	

	
	<table id="table" class="table table-border table-bordered table-hover table-bg ">
		<thead>
			<tr class="text-c">
				<th><input type="checkbox" name="" value=""></th>
				<th>商品编码</th>
				<th >商品名称</th>
				<th >条形码</th>
				<th >规格</th>
				<th >单位</th>
				<th >盘点数量</th>
				<th >盘点前数量</th>
				<th >盈亏数量</th>
				<th>盈亏金额</th>
				<th>操作</th>
				
			</tr>
		</thead>
		<tbody>
		<!-- 循环插入商品信息 -->
		
		
		
		</tbody>
	</table>
	
	</div>

</div>
<!-- 按钮 -->


<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="static/h-ui/js/H-ui.min.js"></script> 
<script type="text/javascript" src="static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->


<script type="text/javascript" src="lib/My97DatePicker/4.8/WdatePicker.js"></script> 
<script type="text/javascript" src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script> 
<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript">




$(function(){
	$('.table-sort').dataTable({
		"aaSorting": [[ 1, "desc" ]],//默认第几个排序
		"bStateSave": true,//状态保存
		"bAutoWidth":true,//自动宽度
		"aoColumnDefs": [
		  //{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
		  {"orderable":false,"aTargets":[0,8,9]}// 制定列不参与排序
		]

	});
	
});

/*用户-添加*/
function member_add(title,url,w,h){
	layer_show(title,url,w,h);
}
/*用户-查看*/
function member_show(title,url,id,w,h){
	layer_show(title,url,w,h);
}

/*用户-编辑*/
function member_edit(title,url,id,w,h){
	layer_show(title,url,w,h);
}
/*用户-删除*/
function member_del(obj,id){
	layer.confirm('确认要删除吗？',function(index){
		$.ajax({
			type: 'POST',
			url: '',
			dataType: 'json',
			success: function(data){
				$(obj).parents("tr").remove();
				layer.msg('已删除!',{icon:1,time:1000});
			},
			error:function(data) {
				console.log(data.msg);
			},
		});		
	});
}


/*切换仓库时刷新表格*/
$("#reposity").change(
function()
{
	$.post('GetStockProductServlet',{reposity:$("#reposity").val()},callback)
	
	});
	function callback(data)
	{   
		
	$("#hang").each(function(index, el) {
		
		$(this).remove();
		
	});
	
		var str=data.split("-");
		
		if(str.length>0&&str[0].length>0)
			{
			
			//每一行
			for(i=0;i<str.length;i++)
			{			
			//每一列
			var str1=str[i].split(",");
			
			 var ht="<tr id='hang' class='text-c'><td><input type='checkbox' name='' value=''></td><td>"+str1[0]+"</td><td>"+str1[1]+"</td><td>"+str1[2]+"</td><td>"+str1[3]+"</td>"
			 +"<td>"+str1[4]+"</td><td><input type='text' class='input-text' id='takingnum' style='width:100px'></input></td><td>"+str1[5]+"</td><td></td><td></td><td><a style='text-decoration:none' class='ml-5' onClick='article_del(this,'10001')' href='javascript:;' title='删除'><i class='Hui-iconfont'>&#xe6e2;</i></a></td></tr>"
			  $("#table").append(ht);
			}
			 $("#count").html(str.length);
			}
	
		
			}

/**
 * 盘点功能
 */
 
 $("#pandian").click(
function()
{  
	alert("进入盘点");
	$("#takingnum").each(function(index, el) {
	if($(this).html()!=""&&$(this).html()!=null)
	{
		
		alert($(this).html());
	}
	

//	$.post('TakingProductServlet',{reposity:$("#reposity").val()},callback)
	
	})
});
 
</script> 
</body>
</html>